package com.yanqu.road.entity.activity.huashigang;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.player.UserBaseInfo;

/**
 * @Author wpj
 * @Date 2020/10/3
 */

@FieldTypeAnnotation(tableName = "t_c_huashigang_monster")
public class HuaShiGangMonsterData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true)
    int activityId;
    @FieldTypeAnnotation(update = true)
    String pointKey = "";
    @FieldTypeAnnotation(update = true)
    int monsterId;
    @FieldTypeAnnotation(desc = "总血量")
    long allBlood;
    @FieldTypeAnnotation(desc = "当前血量")
    long nowBlood;
    @FieldTypeAnnotation(desc = "击杀人")
    UserBaseInfo killPlayer = new UserBaseInfo();
    @FieldTypeAnnotation(desc = "击杀的用户id")
    long killUserId;

    public HuaShiGangMonsterData() {
    }

    public HuaShiGangMonsterData(long allBlood) {
        this.allBlood = allBlood;
        this.nowBlood = allBlood;
    }


    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }

    }
    public void setPointKey(String pointKey) {
        if(null == pointKey){
            return;
        }
        if(!this.pointKey.equals(pointKey)) {
            this.pointKey = pointKey;
            setOp(DataStatus.Update);
        }
    } public void setMonsterId(int monsterId) {
        if (this.monsterId != monsterId) {
            this.monsterId = monsterId;
            setOp(DataStatus.Update);
        }

    }
    public void setAllBlood(long allBlood) {
        if (this.allBlood != allBlood) {
            this.allBlood = allBlood;
            setOp(DataStatus.Update);
        }

    }
    public void setNowBlood(long nowBlood) {
        if (this.nowBlood != nowBlood) {
            this.nowBlood = nowBlood;
            setOp(DataStatus.Update);
        }

    }

    public void setKillPlayer(UserBaseInfo killPlayer) {
        this.killPlayer = killPlayer;
        setUpdateOption();
    }

    public long getKillUserId() {
        return killUserId;
    }

    public void setKillUserId(long killUserId) {
        if (this.killUserId != killUserId) {
            this.killUserId = killUserId;
            setUpdateOption();
        }

    }

    public int getActivityId() {
        return activityId;
    }

    public String getPointKey() {
        return pointKey;
    }

    public int getMonsterId() {
        return monsterId;
    }

    public long getAllBlood() {
        return allBlood;
    }

    public long getNowBlood() {
        return nowBlood;
    }

    public UserBaseInfo getKillPlayer() {
        return killPlayer;
    }
}
